/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hilos;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import interfaz.GUIPrincipal;

/**
 *
 * @author Felipe Serrano
 */
public class HiloModificaUcf extends HiloNessy{
    
    public HiloModificaUcf(String nombre){
        setName(nombre);
    }
    
    public void run(){
        try {
            BufferedWriter bw = new BufferedWriter(new FileWriter(GUIPrincipal.RUTA_PROYECTO_ACTUAL+"\\edk\\data\\system.ucf",true));
            bw.write("\n");
            bw.write("INST \"adaptador_circuito_0\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"adaptador_uart_0\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"clock_generator_0\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"dlmb\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"dlmb_cntlr\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"ilmb\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"ilmb_cntlr\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"lmb_bram\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"mb_plb\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"mdm_0\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"microblaze_0\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"proc_sys_reset_0\" AREA_GROUP = \"AG\";\n");
            bw.write("INST \"xps_hwicap_0\" AREA_GROUP = \"AG\";\n");
            bw.write("AREA_GROUP \"AG\" RANGE=SLICE_X0Y0:SLICE_X107Y70;\n");
            //bw.write("AREA_GROUP \"AG\" RANGE=SLICE_X0Y90:SLICE_X107Y159;\n");
            bw.write("\n");
            bw.write("INST \"DDR2_SDRAM\" AREA_GROUP = \"AG_memory\";\n");
            bw.write("AREA_GROUP \"AG_memory\" RANGE=SLICE_X0Y0:SLICE_X11Y159;\n");
            //bw.write("AREA_GROUP \"AG_memory\" RANGE=SLICE_X64Y0:SLICE_X107Y159;\n");
            bw.write("\n");
            bw.close();
        } catch (IOException ex) {
            Logger.getLogger(HiloModificaUcf.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
}
